<?php
class forst extends CI_Controller {
	function data($type = 1) {
		if ($type == 2) {
			exit();
			//http://see.cloudxt.cn/start/forst/data/2
			$name = $this -> config -> item('xt_name');
			$url = $_SERVER['HTTP_HOST'];
			$sql1 = 'INSERT INTO `pan_setting` (`id`, `name`, `wxAppId`, `wxAppSecret`, `fs_numb`, `fs_je`, `note`, `bj`, `fzgsr`, `logo`, `dianzhao`, `citys`, `qrcode`, `tj_sp`) VALUES(1, \'' . $name . '\', \'\', \'\', 0, 0, \'\', \'2015-04-18/1a5d5e9bad6cc55666fd5a92af6a611c.jpg\', 0, \'2015-04-16/02d1b92bed81573ce56d4b7b61ca83bb.jpg\', \'\', \'\', \'a:10:{s:8:"name_top";s:3:"170";s:6:"tx_top";s:1:"0";s:7:"tx_left";s:1:"0";s:4:"tx_k";s:1:"0";s:4:"tx_g";s:1:"0";s:4:"qr_k";s:3:"280";s:4:"qr_g";s:3:"280";s:6:"qr_top";s:3:"180";s:7:"qr_left";s:3:"105";s:5:"qr_bg";s:47:"2015-11-07/9669e672ed9cc04b6628cb6f9037fbaf.jpg";}\', \'1\');';
			$sql2 = 'INSERT INTO `pan_staff` (`staff_id`, `name`, `phone`, `password`, `state`, `note`, `type`, `ly`, `staff_del`, `jg_name`, `jg_qy`, `jg_dz`, `jg_phone`, `jg_jd`, `jg_wd`, `mid`, `jg_rxse`, `jg_hezuo`, `jg_pic`, `jg_sort`, `jg_jy`, `jg_dianzhao`, `is_xs`) VALUES(1, \'Kayen\', \'15011931913\', \'6F1DE59B090B041775B677C634562143\', 2, \'\', 1, \'0\', 1, \'总部\', \'\', \'珠江新城\', \'13422277888\', \'\', \'\', 1, \'\', \'\', \'2015-06-08/efed061689577ddeb8d72905007c9508.jpg\', 0, 0, \'\', 1);';
			$sql3 = 'INSERT INTO `pan_sp` (`sp_id`, `gys_id`, `name`, `tj`, `pic1`, `pic2`, `pic3`, `fl2`, `fl1`, `price`, `price_sc`, `color`, `size`, `kc`, `dl`, `lq`, `bh`, `ml`, `sort`, `ms`, `sj`, `sy`, `sp_del`, `jj`, `bq`, `jp`, `jp_ktime`, `jp_jtime`, `jp_price`, `jp_bl`, `bm_ktime`, `bm_jtime`, `bm_info`, `nf`, `jg_numb`, `color_item`, `dl1`, `dl2`, `sk_mid`, `sk_je`, `staff_id`, `xffs`, `lj_numb`, `lj_je`, `sk_is`, `gm_bt`) VALUES(1, 0, \'' . $name . '\', \'\', \'2015-06-19/3354ede69a57346750d889e9e679df96.jpg\', \'\', \'\', NULL, \'\', 999, \'1000\', \'\', \'0\', 1000, 10, 0, \'001\', \'0\', 1, \'' . $name . '\', 1, 0, 1, \'' . $name . '\', \'' . $name . '\', 1, 0, 0, 0, \'0\', 0, 0, \'0\', 0, NULL, \'\', 6, 1, 0, 0, 0, 1, 0, 0, 2, \'\');';
			$sql4 = 'INSERT INTO `pan_wz` (`wz_id`, `wz_del`, `fl1`, `sort`, `title`, `jj`, `pic`, `url`, `nr`, `pl_type`, `sytj`, `gjz`, `sy_tj`, `xs`, `pv`, `is_wx`) VALUES(1 , 1, \'\', \'1\', \'欢迎光临' . $name . '\', \'欢迎光临' . $name . '\', \'2015-06-19/20493b18a9218a894dfb7ff1654f92ea.jpg\', \'http://' . $url . '/\', \'\', 3, NULL, \'' . $name . '\', 1, 2, 0, 1);';
			$sql5 = 'INSERT INTO `pan_bill` (`bill_id`, `mid`, `tj_mid`, `je`, `numb`, `sy_lq`, `zffs`, `name`, `phone`, `dq`, `zz`, `state`, `ly`, `mktime`, `mkip`, `wl_hao`, `wl_name`, `bz`, `zfzt`, `thfs`, `thshop`, `use_jb`, `is_jp`, `is_wxzf`) VALUES(100, 1, 0, 999, 1, NULL, 0, \'潘涯\', \'13422277282\', \'--\', \'北京路\', 0, \'0\', 1434705926, \'42.197.182.37\', \'\', \'\', NULL, 1, 1, 0, 2, 1, 2);';
			$sql6 = 'INSERT INTO `pan_bill_item` (`id`, `mid`, `bill_id`, `tj_mid`, `sp_id`, `sp_name`, `sp_price`, `sp_dl`, `sp_lq`, `numb`, `je`, `note`, `nnjp`, `sp_dl1`, `sp_dl2`, `sp_color`) VALUES(1, 1, 100, 0, 1, \'' . $name . '\', 999, 10, 0, 1, 999, NULL, 1, 6, 1, NULL);';
			$sql7 = 'INSERT INTO `pan_fl` (`fl_id`, `name`, `sort`, `pid`, `note`, `sf`, `url`, `fl_del`) VALUES
(1, \'立即购买\', 1, 0, \'\', 2, \'http://' . $url . '/\', 1),
(2, \'东家专区\', 2, 0, \'\', 5, \'\', 1),
(3, \'东家中心\', 1, 2, \'\', 2, \'http://' . $url . '/shop/bill\', 1),
(4, \'购物车\', 2, 2, \'\', 2, \'http://' . $url . '/shop/gm\', 1),
(5, \'获取推广链接\', 3, 2, \'\', 5, \'hqll\', 1),
(6, \'获取推广二维码\', 4, 2, \'\', 5, \'haibao\', 1),
(7, \'服务中心\', 3, 0, \'\', 5, \'\', 1),
(8, \'推荐阅读\', 1, 7, \'\', 2, \'http://' . $url . '/article/lists\', 1);';
			$this -> db -> query($sql1);
			$this -> db -> query($sql2);
			$this -> db -> query($sql3);
			$this -> db -> query($sql4);
			$this -> db -> query($sql5);
			$this -> db -> query($sql6);
			$this -> db -> query($sql7);
			echo 'start up...';
		}

	}

}
?>
